<%@page import="com.windfone.common.Constant"%>
<%@ page language="java" contentType="text/html; charset=utf-8"	pageEncoding="utf-8"%>
<%@ include file="head.jsp"%>
<%@ taglib uri="/WEB-INF/recommend.tld" prefix="windfone"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>${mobile.name } 风驰电讯 您最贴心的手机顾问</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
<script src="js/jquery-1.4.2.js"></script>
<script>
	function submitAddCarForm() {
		var addCarForm = document.getElementById("addCarForm");
		addCarForm.submit();
	}
	function createNewSession() {
		var productHiddenSession = document
				.getElementById("productHiddenSession");
		$.ajax( {
			type : "POST",
			url : "fetchNewssion.action",
			success : function(msg) {
				productHiddenSession.value = msg;
			}
		});
	}
	function check() {
		var t1 = document.getElementById("askcontent");
		var regC = /[^ -~]+/g;
		var regE = /\D+/g;
		var str = t1.value;
		
		if (regC.test(str)){
		    t1.value = t1.value.substr(0,250);
		}
		if(regE.test(str)){
		    t1.value = t1.value.substr(0,500);
		}
	}
</script>
</head>
<body id="pages2">

<!--头部-->
<%@ include file="navigate.jsp"%>

<!--内容-->
<div class="contentBox">
<div class="col1">
  <div class="tabLeBox">
    <div class="title">
      <h3>商品信息: ${mobile.name }</h3>
    </div>
    <div class="borderBox">
    <form method="post" action="myshoppingcar.action" id="addCarForm"	name="addCarForm">
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="phoneInfo">
        <tr>
          <td width="300" valign="top">
          <div style="border:1px solid #ccc"><img src="<%=contextPath%>/${mobile.bigImagepath}" width="250" height="250" /></div></td>
          <td valign="top" class="phoneSales" style="padding-left:35px;">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td colspan="2">
              <div> 
              <span>${mobile.name }  标准配置</span> ${mobile.standard} 
              <span>${mobile.name }  系统语言</span> ${mobile.system}
              <span>${mobile.name }  相关服务</span> ${mobile.service }
               </div>
              </td>
            </tr>
            <tr>
              <td colspan="2" class="phonePrice">
     <h3>售价</h3>
    <ul>
			<c:if test="${not empty packages }">
				<c:forEach var="package" items="${packages}" varStatus="status">
					<li>
						<label>
							<input name="priceAndColor" id="priceAndColor" type="radio" value="${package.price }_${package.id}" checked="checked" onclick="createNewSession()" />${package.compose }
							<c:if test="${package.price == 0.0 }">即將上市</c:if>
							<c:if test="${package.price != 0.0 }">${package.price }元</c:if>
						</label>
					</li>
				</c:forEach>
			</c:if>
			<c:if test="${ empty packages }">
				<li>
					<label>
						<c:if test="${mobile.price == 0.0 }">即將上市</c:if>
						<c:if	test="${mobile.price != 0.0 }">
						<input type="radio" id="price" name="price" value="${mobile.price}" checked="checked"/>
						${mobile.price }元</c:if>
					</label>
				</li>
			</c:if>
    </ul></td>
              </tr>
            <tr>
              <td width="155"><a href="#">
              <img src="images/gi_img6.jpg" width="144" height="30"  onclick="submitAddCarForm();"/></a>
              </td>
              <td><a	href="tencent://message/?uin=1658167870&Site=风驰电讯&Menu=yes" target="blank">
							<img alt="点击这里给我发消息 " src=http://wpa.qq.com/pa?p=1:1658167870:1 " border="0" />
						</a>&nbsp;&nbsp;<a target="_blank" href="http://amos.im.alisoft.com/msg.aw?v=2&uid=深圳风驰贸易&site=cntaobao&s=1&charset=utf-8"><img border="0" src="http://amos.im.alisoft.com/online.aw?v=2&uid=dlucsf&site=cntaobao&s=1&charset=utf-8" alt="点击这里给我发消息" /></a></td>
            </tr>
          </table>
          	<input type="hidden" name="productId" id="productId" value="${mobile.id }" /> 
			<input type="hidden" name="productHiddenSession" id="productHiddenSession" value="<%java.util.Date date = new java.util.Date();	out.println(date.getTime()); session.setAttribute("productSession", date.getTime());%>" />
			<input type="hidden" name="priceValue" id="priceValue" /> 
			<input type="hidden" name="goodstype" id="goodstype" value="0" />
	</form>
          </td>
          <td width="186" valign="top" style="padding-right:30px"><div style="padding-left:5px; margin-bottom:10px"><a href="#"><img src="images/call.gif" width="181" height="62" /></a></div>
            <div class="tabLeBox">
              <div class="title">
                <h3>导购帮助</h3>
              </div>
              <div class="borderBox">
                <ul class="helpLink">
                  <li><a href="servicenewdetail.action?newsId=17&newsTypeId=5" target="_blank">网上购买商品流程</a></li>
                  <li><a href="servicenewdetail.action?newsId=18&newsTypeId=5" target="_blank">汇款方式及帐号查询</a></li>
                  <li><a href="servicenewdetail.action?newsId=19&newsTypeId=5" target="_blank">分期付款购买方式说明</a></li>
                  <li><a href="servicenewdetail.action?newsId=20&newsTypeId=5" target="_blank">售后保修条例及投诉方式</a></li>
                </ul>
                <div class="clear"></div>
              </div>
            </div></td>
        </tr>
      </table>
      <div class="clear"></div>
    </div>
  </div>
</div>
<div style="float:left; width:240px;">
  <div class="tabLeBox">
    <div class="title">
      <h3>热门品牌</h3>
    </div>
<%@include file="detailmobileLeftNavi.jsp" %>
  </div>
  <div class="tabLeBox">
    <div class="title">
      <h3>新机抢先看</h3>
    </div>
    <div class="borderBox">
      <%@include file="newsee.jsp"%>
    </div>
  </div>
</div>
<div style="float:left; width:753px; padding-left:7px;">
  <div class="tabLeBoxB" style=" padding-top:0">
    <div class="title">
      <h3> 商品详情</h3>
    </div>
    <div class="borderBox">
    ${detailMsg.detailMsg }
      <div class="clear"></div>
    </div>
  </div>
  <div class="tabLeBoxB" style=" padding-top:0">
    <div class="title">
      <h3> 顾客咨询</h3>
    </div>
    <div class="borderBox">
      <div class="gdetail">
    <s:iterator value="askReponses">
        <div class="review">
          <div class="u_title"><span><s:property value='user'/></span><s:date  name='asktime'  format="yyyy-MM-dd HH:mm:ss" />
            咨询：</div>
          <div class="u_body"><s:property value='askcontent'/></div>
          <div class="r_cont">
            <div class="r_title">风驰电讯客服【<s:property value='reponseName'/>】回复：</div>
            <div class="r_body"><s:property value='reponsecontent'/></div>
          </div>
        </div>
        </s:iterator>
      </div>
      <div class="clear"></div>
    </div>
  </div>
  	<form method="post" action="<%=contextPath %>/customerAskProduct.action" name="customerAsk" id="customerAsk">
  <div class="tabLeBoxB" style=" padding-top:0">
    <div class="title">
      <h3> 顾客咨询</h3>
    </div>
    <div class="borderBox">
      <dl class="rev_s">
        <dd class="label1"> 用户名：
          <input name="loginName" maxlength="50" id="loginName" class="i"  <%if ( session.getAttribute("userBean") != null ){ out.print( "readonly value='" +((com.windfone.model.Member)session.getAttribute("userBean")).getLoginName()+"'" );} %> style="width: 150px;" type="text" />
        </dd>
				<%if ( session.getAttribute("userBean") == null ){ %>
				<dd class="label2">密码： 
					<input name="password" maxlength="50" id="password" class="i" style="width: 150px;" type="password" />
				</dd>
				<%} %>
        <dd class="cont">
          <textarea name="askcontent" rows="8" cols="20" id="askcontent" style="width: 98%;" onkeyup="check();"></textarea>
        </dd>
        <dd class="cont">
					<input name="tiijao" value="发表咨询" id="tiijao" type="submit" /> 
					<input name="msgtype" value="1" type="hidden" /> 
					<input name="askId" value="-1" type="hidden" /> 
					<input name="reponseId" value="-1" type="hidden" /> 
					<input name="productId" value="${mobile.id}" type="hidden" /> 
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          您对${mobile.name }发表的咨询我们的工作人员答复后方可显示，请勿重复发表，谢谢
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a name="zixun" id="zixun">&nbsp;</a></dd>
      </dl>
      <div class="clear"></div>
    </div>
  </div>
  	</form>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
<%@ include file="bottom.jsp"%>
</body>
</html>
